package br.ufpe.cin.dsoa.visualvm;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */


import br.ufpe.cin.dsoa.visualvm.facade.PrincipalFacade;


import javax.swing.BorderFactory;
import javax.swing.JEditorPane;
import javax.swing.JPanel;

import org.openide.modules.ModuleInstall;

import com.sun.tools.visualvm.core.ui.components.DataViewComponent;

/**
 * Manages a module's lifecycle. Remember that an installer is optional and
 * often not needed at all.
 */
public class Installer extends ModuleInstall {

   @Override
public void restored() {
    Facade.initialize();
}

@Override
public void uninstalled() {
    Facade.unregister();
}


public static void main(String[] args){
	DataViewComponent dvc ;
	  //Data area for master view:
    JEditorPane generalDataArea = new JEditorPane();
    generalDataArea.setBorder(BorderFactory.createEmptyBorder(14, 8, 14, 8));
    
   //Panel, which we'll reuse in all four of our detail views for this sample:
    JPanel panel = new JPanel();

    //Master view:
    DataViewComponent.MasterView masterView = new DataViewComponent.MasterView("Overview", "Teste 123", generalDataArea);

    //Configuration of master view:
    DataViewComponent.MasterViewConfiguration masterConfiguration = new DataViewComponent.MasterViewConfiguration(false);

    //Add the master view and configuration view to the component:
    dvc = new DataViewComponent(masterView, masterConfiguration);

    //Add detail views to the component:
      dvc.addDetailsView(new DataViewComponent.DetailsView("Hello World Details 4", null, 40, panel, null), DataViewComponent.BOTTOM_RIGHT);

	
}



}
